﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckOut.aspx.cs" Inherits="Web.Settle.CheckOut" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/WebInner.js" type="text/javascript"></script>
    <script src="../Scripts/Common.js" type="text/javascript"></script>
    <link href="../Styles/Common.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/Zebra/zebra_dialog.js" type="text/javascript"></script>
    <link href="../Scripts/Zebra/zebra_dialog.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/My97DatePicker/calendar.js" type="text/javascript"></script>
      <script type="text/javascript">
          /*--------窗体启动设置和基本设置--------*/
          /*--loadFuntion--*/
          $(function () {

              InitWBID();
              $('#QWBID').change(function () {
                  if ($('#QWBID option:selected').val() != "") {
                      $('#txtWBID').val($('#QWBID option:selected').text());
                  }
              });
          });
          function InitWBID() {
              var WBName = $.trim($('#txtWBID').val());
              $('#QWBID').empty();
              $.ajax({
                  url: '/Ashx/wbinfo.ashx?type=GetWBByName&strName=' + WBName,
                  type: 'post',
                  data: '',
                  dataType: 'json',
                  success: function (r) {
                      if (WBName == '') {
                          $('#QWBID').append("<option value=''>--请选择--</option>");
                      }
                      if (r.responseText == "Error") { return false; }
                      for (var i = 0; i < r.length; i++) {
                          $('#QWBID').append("<option value='" + r[i].ID + "'>" + r[i].strName + "</option>");
                      }

                  }, error: function (r) {

                  }
              });
          }

     


      </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="pageHead">
       <b>原粮出库操作</b>
       <%-- <span id="spanHelp" style="cursor: pointer">帮助</span>--%>
    </div>
    <div id="divHelp"  class="pageHelp">
<span>提示1：各种查询可以独使用，也可以联合使用，但必须保证至少有一项查询条件。</span><br />
<span>提示2：每项查询均为模糊查询条件，为保证查找信息的正确性，请输入完整的查询信息。</span><br />

</div>
    
<div id="storageQuery">

</div>
    <div style="margin: 20px 0px;">
        <div id="Query">
            <span>网点名称:</span>
            <input type="text" id="txtWBID" onkeyup="InitWBID();" style="font-size:16px; width:100px; font-weight:bolder;" runat="server" />
            <select id="QWBID"  runat="server" style="width:100px;"></select> &nbsp;
         

            <asp:ImageButton ID="ImageButton1" ImageUrl="~/images/seach_brown.png" 
                runat="server" onclick="ImageButton1_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="CheckOutHistory.aspx">出库记录查询</a>
                 </div>
        
        <div id="StorageList" style="margin:20px 0px">
        <asp:Repeater ID="Repeater1" runat="server">
            <HeaderTemplate>
                <table class="tabData" >
                    <tr class="tr_head">
                        <th style="width: 200px; height:20px; text-align: center;">
                            网点名称
                        </th>
                         <th style="width: 100px; text-align: center;">
                            品种
                        </th>
                        <th style="width: 100px; text-align: center;">
                           等级
                        </th>
                        <th style="width: 150px; text-align: center;">
                            库存
                        </th>
                       
                        <th style="width: 120px; text-align: center;">
                            出库
                        </th>
                       
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr style='background-color: <%#(Container.ItemIndex%2==0)?"#FFFFF;":"#fcf3f4"%>'
                    onmouseover="change_colorOver(this)" onmouseout="change_colorOut(this)">
                    <td align="center" style="height:25px;">
                     
                        <%#Eval("WBName")%>
                     
                    </td>
                   <td align="center">
                  <%#Eval("VarietyName")%>
                   </td>
                  <td align="center">
                   <%#GetVarietyLevel(Eval("VarietyName"))%>
                   </td>
                     <td align="center">
                   <%#Eval("numStorage")%>
                   </td>
                  
                   <td align="center">
                   <%-- <a href="/Settle/CheckOutDetail.aspx?ID=<%#Eval("ID") %>&WBID=<%#Eval("WBID") %>&VarietyID=<%#Eval("VarietyID") %>">出库</a>--%>
                   <%#OutPut(Eval("ID"),Eval("WBID"),Eval("VarietyID")) %>
                   </td>
                   
                </tr>
            </ItemTemplate>
            <FooterTemplate>
           
                <!--底部模板-->
                </table>
                <!--表格结束部分-->
            </FooterTemplate>
        </asp:Repeater>
            
        </div>
       
    </div>
    
    <div  style="display:none;">
     
    </div>
    </form>
    
    <%--定义编号--%>
    <input type="hidden" id="WBID" value="" />
    <%--定义背景色的隐藏域--%>
    <input type="hidden" id="colorName" value="" />
</body>
</html>